<?php /* Template Name: Home Page */ ?>
<?php get_header(); ?>
<?php 
	$args = array(
		'post_type' => 'post',
			array(
				'taxonomy' => 'category',
				'field' => 'slug',
				'terms' => array( 'songs' )
			),
		'orderby' => 'date',
		'order' => 'ASC'
	);
	$thequery = new WP_Query( $args );  
?>	
		<div class="toppaypal">
			<a href="http://www.televisiontunes.com/donate.php">
				<img width="899px" border="0" src="<?php bloginfo( 'template_url' ); ?>/images/tvtunes-header-donations-bar.jpg">
			</a>
		</div>

		<div id="container">
			<div id="content" role="main">				
				<div id="hpage">
					<div id="hpage-left">
						<a href=""><img src="http://www.televisiontunes.com/images/TVGuy-Big2.png"></a>
					</div>
					<div id="hpage-right">
						<div id="hpage-right-text">
							<h1>Browse our huge archive of <span><?php echo $thequery->post_count; ?></span> theme songs.</h1>
							<strong>If you can&#39;t find a theme song, contact me and I&#39;ll try to get it for you.</strong>
						</div>
				
						
					</div>
						<ul id="menu_horizontal">
						<li><a href="a-theme-songs.html">A</a></li>
						<li><a href="b-theme-songs.html">B</a></li>
						<li><a href="c-theme-songs.html">C</a></li>
						<li><a href="d-theme-songs.html">D</a></li>
						<li><a href="e-theme-songs.html">E</a></li>
						<li><a href="f-theme-songs.html">F</a></li>
						<li><a href="g-theme-songs.html">G</a></li>
						<li><a href="h-theme-songs.html">H</a></li>
						<li><a href="i-theme-songs.html">I</a></li>
						<li><a href="j-theme-songs.html">J</a></li>
						<li><a href="k-theme-songs.html">K</a></li>
						<li><a href="l-theme-songs.html">L</a></li>
						<li><a href="m-theme-songs.html">M</a></li>
						<li><a href="n-theme-songs.html">N</a></li>
						<li><a href="o-theme-songs.html">O</a></li>
						<li><a href="p-theme-songs.html">P</a></li>
						<li><a href="q-theme-songs.html">Q</a></li>
						<li><a href="r-theme-songs.html">R</a></li>
						<li><a href="s-theme-songs.html">S</a></li>
						<li><a href="t-theme-songs.html">T</a></li>
						<li><a href="u-theme-songs.html">U</a></li>
						<li><a href="v-theme-songs.html">V</a></li>
						<li><a href="w-theme-songs.html">W</a></li>
						<li><a href="x-theme-songs.html">X</a></li>
						<li><a href="y-theme-songs.html">Y</a></li>
						<li><a href="z-theme-songs.html">Z</a></li>
						<li><a class="last" href="numbers-theme-songs.html">#</a></li>
						</ul>					

						<div id="links">
							<strong>Check out the latest additions</strong><br />
							<select id="e1" class="populate" onchange="this.options[this.selectedIndex].value && (window.location = this.options[this.selectedIndex].value);">
								<option value=""></option>
								<?php echo $thequery->post_count;
								while ( $thequery->have_posts() ) :
									$thequery->the_post();
									echo '<option value="' . get_permalink() . '">' . get_the_title() . '</option>';
								endwhile; wp_reset_postdata(); ?>
							</select>	
							<br />			
							<div id="sublinks">			
								<strong>
		    					Here is a <a href="missing-songs.php"><span>list of songs I don't have.</span></a> <br>
		    					If you have any of them, <a href="contact.php"><span>please get in touch.</span></a> <br>
    						</strong>
								<table cellspacing="0" cellpadding="0" border="0">
									<tr>
										<td valign="top"><img alt="phone" src="<?php bloginfo('template_url'); ?>/images/phone.png">&nbsp;&nbsp;</td>
										<td valign="top"><a target="_blank" onclick="javascript: pageTracker._trackPageview('/outgoing/Ringtones-space.com');" class="get_song" href="http://www.ringtonematcher.com/co/ringtonematcher/02/noc.asp?sid=TETUros&amp;artist=&amp;song=">Get Songs as Ringtones</a></td>
										<td valign="top">&nbsp;&nbsp;<img alt="phone" src="<?php bloginfo('template_url'); ?>/images/phone.png"></td>
									</tr>
								</table>    
							</div>					
						</div>
						
						<div id="hsocial">
							<table>
								<tr>
									<td valign="top" align="right" style="padding-top:18px;">
										<a id="ck_email" class="stbar chicklet" href="javascript:void(0);"><img src="http://w.sharethis.com/chicklets/email.gif" /></a>
										<a id="ck_facebook" class="stbar chicklet" href="javascript:void(0);"><img src="http://w.sharethis.com/chicklets/facebook.gif" /></a>
										<a id="ck_twitter" class="stbar chicklet" href="javascript:void(0);"><img src="http://w.sharethis.com/chicklets/twitter.gif" /></a>
										<a id="ck_sharethis" class="stbar chicklet" href="javascript:void(0);"><img src="http://w.sharethis.com/chicklets/sharethis.gif" />ShareThis</a>
										<script type="text/javascript">
											var shared_object = SHARETHIS.addEntry({
											title: document.title,
											url: document.location.href
										});									
										shared_object.attachButton(document.getElementById("ck_sharethis"));
										shared_object.attachChicklet("email", document.getElementById("ck_email"));
										shared_object.attachChicklet("facebook", document.getElementById("ck_facebook"));
										shared_object.attachChicklet("twitter", document.getElementById("ck_twitter"));
										</script>
									</td>
								</tr>
								<tr>
									<td valign="top" style="padding-top:20px;">									
										<div id="fb-root"></div>
										<script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script><fb:like-box href="http://www.facebook.com/pages/TelevisionTunescom/178261387583" width="292" show_faces="true" stream="false" header="true"></fb:like-box></td>
								</tr>
							</table>	
						</div>						
						<div id="othersongs">					
							<table>
								<tr>
								  <th colspan="4">Check out these sites for more great songs.</th>
								</tr>
								<tr>
								  <td><a href="http://gamethemesongs.com"><img alt="Video Game Songs" src="<?php bloginfo('template_url'); ?>/images/gamethemesongs.jpg"></a></td>
								  <td><a target="_blank" style="color:#7d1e1f;" href="http://gamethemesongs.com">Game Theme Songs</a><br><a target="_blank" style="color:#333;" href="http://gamethemesongs.com">For video game music and songs.</a></td>
								  <td><a href="http://spookysoundtrack.com/"><img alt="Halloween Music" src="<?php bloginfo('template_url'); ?>/images/spooky.jpg"></a></td>
								  <td><a href="http://spookysoundtrack.com">Halloween Music</a><br>Lots and lots of <a href="http://spookysoundtrack.com">scary songs and sound effects</a>.</td>
								</tr>
								<tr>
								  <td><a href="http://tvadsongs.com"><img width="47" border="0" alt="" src="<?php bloginfo('template_url'); ?>/images/tv-adsongs.jpg"></a></td>
								  <td><a style="color:#7d1e1f;" href="http://tvadsongs.com">TV Ad Songs</a>.<br><a style="color:#333;" href="http://tvadsongs.com">For TV commercials with great songs.</a></td>
								  <td><a href="http://footballfightmusic.com"><img width="47" height="55" border="0" alt="Football Fight Music" src="<?php bloginfo('template_url'); ?>/images/footballfight.jpg"></a></td>
								  <td><a href="http://footballfightmusic.com">Football Music</a><br><a href="http://footballfightmusic.com">Football songs</a> from the NCAA and NFL.</td>
								</tr>
									<tr>
								  <td><a href="http://fcsongs.com"><img alt="Football Club Music" src="<?php bloginfo('template_url'); ?>/images/fc-songs.jpg"></a></td>
								  <td><a style="color:#7d1e1f;" href="http://fcsongs.com">FC Songs</a>.<br><a style="color:#333;" href="http://fcsongs.com">For football club songs from around the world.</a></td>
								  <td><a href="http://holysmokesbatman.com"><img border="0" alt="Holy Smokes Batman" src="<?php bloginfo('template_url'); ?>/images/robin.jpg"></a></td>
								  <td>Hilarious sound clips from <a href="http://holysmokesbatman.com">Batman</a> and <a href="http://imtroymcclure.com">Troy McClure</a></td>
								</tr>
							</table>					
						</div>		
				</div>
				
				<div class="introtext">
					This website is a library of theme songs. I do not own any of these songs and will gladly remove any songs that the owner would like taken down. Please send me an email and I will comply right away. 
				</div>
				
			</div><!-- #content -->
		</div><!-- #container -->
<?php get_footer(); ?>